package top.ieei.demo.ftp.server;

import java.io.Serializable;

public class UserEntry implements Serializable
{
	/** 匿名用户的用户名 */
	public static final String USER_NAME_ANONYMOUS = "anonymous";

	/** 序列化ID */
	private static final long serialVersionUID = 6277319590958945176L;

	/** FTP服务目录 */
	private FtpEntry entry;

	/**
	 * 用户名
	 */
	private String userName;

	/**
	 * 密码
	 */
	private String password;

	/**
	 * 构造函数1
	 */
	public UserEntry(String userName, String password, String homeDir,
			boolean writePerm)
	{
		this.userName = userName;
		this.password = password;
		this.entry = new FtpEntry(homeDir, writePerm);
	}

	/**
	 * 构造函数2
	 */
	public UserEntry(String userName, String password, FtpEntry entry)
	{
		this.userName = userName;
		this.password = password;
		this.entry = entry;
	}

	/**
	 * @return 返回 entry
	 */
	public FtpEntry getEntry()
	{
		return entry;
	}

	/**
	 * @param 对entry进行赋值
	 */
	public void setEntry(FtpEntry entry)
	{
		this.entry = entry;
	}

	/**
	 * @return 返回 userName
	 */
	public String getUserName()
	{
		return userName;
	}

	/**
	 * @param 对userName进行赋值
	 */
	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	/**
	 * @return 返回 password
	 */
	public String getPassword()
	{
		return password;
	}

	/**
	 * @param 对password进行赋值
	 */
	public void setPassword(String password)
	{
		this.password = password;
	}

}
